<template>
	<view class="bb-nav">
		<!-- 手机刘海 -->
		<view :style="getstatusHeight"></view>
		<view v-if="type=='bbsearch'">
				<bb-search></bb-search>
		</view>
		<view v-if="type=='liusearch'">
				<liu-search   @change="inputSearch"></liu-search>
		</view>
		<view v-if="type=='title'">
				title
		</view>
	</view>
</template>

<script>
	import liuSearch from "@/components/Custom/liu-search/liu-search.vue"
	import bbSearch from "@/components/Custom/bb-search/bb-search.vue"
	export default {
		name: "bb-nav",
		props: {
			type: {
				type: String,
				default: 'title'
			},
			title:{
				type: String,
				default: '班帮'
			}
		},
		components: {
			liuSearch,
			bbSearch

		},
		data() {
			return {
				// type: 'title',
				searchImg: require('../../../static/search.png'),
			};
		},
		computed: {
			
			getstatusHeight() {
				let statusBarHeight = uni.getSystemInfoSync().statusBarHeight
				// statusBarHeight.s
				console.log(statusBarHeight)
				return "height:" + statusBarHeight + "px"
			}


		},
		methods: {
			inputSearch(value){
				this.$emit("inputSearch",value)
				console.log(value);
			},
			handleEvent(value) {
			    // 处理传递的值
			 //    console.log(value);
				// this.$emit('eventName', value);
			  },
			getshow(type){
				if (this.type==type){
					return true
				}
				return 
			},
			text(){
				console.log(this.type)
			}
		}

	}
</script>

<style>
	.bb-nav {
		background-color: #c6ff96;
	}
</style>